Integrand size = 40, antiderivative size = 107 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {1}{2} \left (2 a b B+a^2 C+2 b^2 C\right ) x+\frac {\left (2 a^2 B+3 b^2 B+6 a b C\right ) \sin (c+d x)}{3 d}+\frac {a (2 b B+a C) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a^2 B \cos ^2(c+d x) \sin (c+d x)}{3 d} \]
[Out]
Time = 0.32 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {4157, 4109, 4132, 2717, 4130, 8} \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {\left (2 a^2 B+6 a b C+3 b^2 B\right ) \sin (c+d x)}{3 d}+\frac {1}{2} x \left (a^2 C+2 a b B+2 b^2 C\right )+\frac {a^2 B \sin (c+d x) \cos ^2(c+d x)}{3 d}+\frac {a (a C+2 b B) \sin (c+d x) \cos (c+d x)}{2 d} \]
[In]
[Out]
Rule 8
Rule 2717
Rule 4109
Rule 4130
Rule 4132
Rule 4157
Rubi steps \begin{align*} \text {integral}& = \int \cos ^3(c+d x) (a+b \sec (c+d x))^2 (B+C \sec (c+d x)) \, dx \\ & = \frac {a^2 B \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) \left (-3 a (2 b B+a C)+\left (\left (-2 a^2-3 b^2\right ) B-6 a b C\right ) \sec (c+d x)-3 b^2 C \sec ^2(c+d x)\right ) \, dx \\ & = \frac {a^2 B \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{3} \int \cos ^2(c+d x) \left (-3 a (2 b B+a C)-3 b^2 C \sec ^2(c+d x)\right ) \, dx-\frac {1}{3} \left (-2 a^2 B-3 b^2 B-6 a b C\right ) \int \cos (c+d x) \, dx \\ & = \frac {\left (2 a^2 B+3 b^2 B+6 a b C\right ) \sin (c+d x)}{3 d}+\frac {a (2 b B+a C) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a^2 B \cos ^2(c+d x) \sin (c+d x)}{3 d}-\frac {1}{2} \left (-2 a b B-a^2 C-2 b^2 C\right ) \int 1 \, dx \\ & = \frac {1}{2} \left (2 a b B+a^2 C+2 b^2 C\right ) x+\frac {\left (2 a^2 B+3 b^2 B+6 a b C\right ) \sin (c+d x)}{3 d}+\frac {a (2 b B+a C) \cos (c+d x) \sin (c+d x)}{2 d}+\frac {a^2 B \cos ^2(c+d x) \sin (c+d x)}{3 d} \\ \end{align*}
Time = 0.66 (sec) , antiderivative size = 90, normalized size of antiderivative = 0.84 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {6 \left (2 a b B+a^2 C+2 b^2 C\right ) (c+d x)+3 \left (3 a^2 B+4 b^2 B+8 a b C\right ) \sin (c+d x)+3 a (2 b B+a C) \sin (2 (c+d x))+a^2 B \sin (3 (c+d x))}{12 d} \]
[In]
[Out]
Time = 0.42 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.82
method | result | size |
parallelrisch | \(\frac {\left (6 B a b +3 C \,a^{2}\right ) \sin \left (2 d x +2 c \right )+B \,a^{2} \sin \left (3 d x +3 c \right )+\left (9 B \,a^{2}+12 B \,b^{2}+24 C a b \right ) \sin \left (d x +c \right )+12 x d \left (B a b +\frac {1}{2} C \,a^{2}+C \,b^{2}\right )}{12 d}\) | \(88\) |
derivativedivides | \(\frac {\frac {B \,a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+2 B a b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,b^{2} \sin \left (d x +c \right )+2 C a b \sin \left (d x +c \right )+C \,b^{2} \left (d x +c \right )}{d}\) | \(114\) |
default | \(\frac {\frac {B \,a^{2} \left (2+\cos \left (d x +c \right )^{2}\right ) \sin \left (d x +c \right )}{3}+2 B a b \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+C \,a^{2} \left (\frac {\sin \left (d x +c \right ) \cos \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+B \,b^{2} \sin \left (d x +c \right )+2 C a b \sin \left (d x +c \right )+C \,b^{2} \left (d x +c \right )}{d}\) | \(114\) |
risch | \(B a b x +\frac {a^{2} x C}{2}+x C \,b^{2}+\frac {3 a^{2} B \sin \left (d x +c \right )}{4 d}+\frac {\sin \left (d x +c \right ) B \,b^{2}}{d}+\frac {2 \sin \left (d x +c \right ) C a b}{d}+\frac {B \,a^{2} \sin \left (3 d x +3 c \right )}{12 d}+\frac {\sin \left (2 d x +2 c \right ) B a b}{2 d}+\frac {\sin \left (2 d x +2 c \right ) C \,a^{2}}{4 d}\) | \(116\) |
norman | \(\frac {\left (-B a b -\frac {1}{2} C \,a^{2}-C \,b^{2}\right ) x +\left (-3 B a b -\frac {3}{2} C \,a^{2}-3 C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8}+\left (-3 B a b -\frac {3}{2} C \,a^{2}-3 C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10}+\left (-B a b -\frac {1}{2} C \,a^{2}-C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}+\left (B a b +\frac {1}{2} C \,a^{2}+C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12}+\left (B a b +\frac {1}{2} C \,a^{2}+C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14}+\left (3 B a b +\frac {3}{2} C \,a^{2}+3 C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\left (3 B a b +\frac {3}{2} C \,a^{2}+3 C \,b^{2}\right ) x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}+\frac {\left (2 B \,a^{2}-2 B a b +2 B \,b^{2}-C \,a^{2}+4 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13}}{d}-\frac {\left (2 B \,a^{2}-6 B a b +18 B \,b^{2}-3 C \,a^{2}+36 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{3 d}-\frac {\left (2 B \,a^{2}+2 B a b +2 B \,b^{2}+C \,a^{2}+4 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {\left (2 B \,a^{2}+6 B a b +18 B \,b^{2}+3 C \,a^{2}+36 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}-\frac {4 a \left (2 B b +C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}-\frac {2 a \left (4 a B -6 B b -3 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11}}{3 d}+\frac {2 a \left (4 a B +6 B b +3 C a \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{3}}\) | \(527\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.79 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (C a^{2} + 2 \, B a b + 2 \, C b^{2}\right )} d x + {\left (2 \, B a^{2} \cos \left (d x + c\right )^{2} + 4 \, B a^{2} + 12 \, C a b + 6 \, B b^{2} + 3 \, {\left (C a^{2} + 2 \, B a b\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d} \]
[In]
[Out]
Timed out. \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.01 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=-\frac {4 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{2} - 3 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} C a^{2} - 6 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} B a b - 12 \, {\left (d x + c\right )} C b^{2} - 24 \, C a b \sin \left (d x + c\right ) - 12 \, B b^{2} \sin \left (d x + c\right )}{12 \, d} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (99) = 198\).
Time = 0.32 (sec) , antiderivative size = 254, normalized size of antiderivative = 2.37 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {3 \, {\left (C a^{2} + 2 \, B a b + 2 \, C b^{2}\right )} {\left (d x + c\right )} + \frac {2 \, {\left (6 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 3 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 6 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 12 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 6 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 24 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, B a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 12 \, C a b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 6 \, B b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
[In]
[Out]
Time = 17.23 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.07 \[ \int \cos ^4(c+d x) (a+b \sec (c+d x))^2 \left (B \sec (c+d x)+C \sec ^2(c+d x)\right ) \, dx=\frac {C\,a^2\,x}{2}+C\,b^2\,x+\frac {3\,B\,a^2\,\sin \left (c+d\,x\right )}{4\,d}+\frac {B\,b^2\,\sin \left (c+d\,x\right )}{d}+B\,a\,b\,x+\frac {B\,a^2\,\sin \left (3\,c+3\,d\,x\right )}{12\,d}+\frac {C\,a^2\,\sin \left (2\,c+2\,d\,x\right )}{4\,d}+\frac {2\,C\,a\,b\,\sin \left (c+d\,x\right )}{d}+\frac {B\,a\,b\,\sin \left (2\,c+2\,d\,x\right )}{2\,d} \]
[In]
[Out]